package com.zcoj.pojo.Dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author 剩xia的盛夏
 * @date 2023/02/24 16:16
 */
@Data
@ApiModel("")
public class Contest  implements Serializable {

    private static final long serialVersionUID = 2892248514883451461L;

    @ApiModelProperty(value = "", example = "1")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "团队图像")
    private String avatar;

    @ApiModelProperty(value = "比赛创建者id", example = "1")
    private Integer uid;

    @ApiModelProperty(value = "比赛创建者的用户名")
    private String author;

    @ApiModelProperty(value = "比赛标题")
    private String title;

    @ApiModelProperty(value = "0为acm赛制，1为比分赛制", example = "1")
    private Integer type;

    @ApiModelProperty(value = "比赛说明")
    private String description;

    @ApiModelProperty(value = "0为公开赛，1为私有赛（访问有密码)", example = "1")
    private Integer auth;

    @ApiModelProperty(value = "比赛密码")
    private String pwd;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "比赛时长(s)", example = "1")
    private Integer duration;

    @ApiModelProperty(value = "是否开启封榜 0不开启 1开启")
    private Integer sealRank;

    @ApiModelProperty(value = "封榜起始时间，一直到比赛结束，不刷新榜单")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sealRankTime;

    @ApiModelProperty(value = "比赛结束是否自动解除封榜,自动转换成真实榜单 0否 1是")
    private Integer autoRealRank;

    @ApiModelProperty(value = "0禁用", example = "1")
    private Integer status;

    @ApiModelProperty(value = "是否可见 0否 1是")
    private Integer visible;

    @ApiModelProperty(value = "是否开放比赛榜单")
    private Boolean openRank;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
